package day0717;

import java.util.Random;
import java.util.Scanner;

public class Test10 {
    public static void main(String[] args) {
        Random ra=new Random();
        Scanner sc=new Scanner(System.in);

        int i=1;
        while(i<=5){
            //生成1道乘法题
            int a=ra.nextInt(20)+1; //1---20
            int b=ra.nextInt(20)+1; //1---20
            System.out.println(a+ "*"  + b +"=");
            //用Scanner输入回答答案，并显示对错。
            double c=sc.nextDouble();
            if(c  == a* b){
                System.out.println("回答正确");
            }else{
                System.out.println("回答错误");
            }
            i++;
        }


    }
}
